//
// Created by Arnold on 2021/5/18.
//

#ifndef ZKLX_ATP_THP_LX_SERIAL_H
#define ZKLX_ATP_THP_LX_SERIAL_H


#include "comm.h"

EP_INT lx_serial_open(const char  *serial_dev, EP_INT n_speed);

EP_INT lx_serial_read_char(EP_INT fd, EP_CHAR *ch);

EP_INT lx_serial_read_until(EP_INT fd, EP_CHAR *buf, EP_INT buf_size);

EP_INT lx_serial_read_wait (EP_INT fd, EP_CHAR *buf, EP_INT buf_size, EP_INT wait_sec);

EP_INT lx_serial_read_time (EP_INT fd, EP_CHAR  *buf, EP_INT buf_size, EP_INT time_sec);

EP_INT lx_serial_write(EP_INT fd, EP_VOID *buf, EP_INT buf_size);

EP_VOID lx_serial_close(EP_INT fd);


#endif //ZKLX_ATP_THP_LX_SERIAL_H
